import React from 'react'
import styled from 'styled-components'

export default function App() {
    const Nobunaga = styled(Child)`   //子组件的样式定义    const 父组件中定义的子组件名 = styled(子组件名)
        background-color:red;
        height:100px;
        width:100px;
    `
  return (
    <div>
        <Nobunaga></Nobunaga>
    </div>
  )
}

function Child(props){    // function 子组件名(props)
    return (
        <div className={props.className}>     {/*className={props.classname} */}

        </div>
    )
}